let http = require("http");
let tool=require("tools")
let tool1=require("./tools1")
console.log(tool)
console.log(tool1)
http.createServer((req, res) => {
    console.log(req.url)
    res.writeHead(200, { "Content-Type": "text/html;charset=utf-8" })

    if (req.url != '/favicon.ico') {
        // 获取请求参数get
        let data = new URL("https://blog.csdn.net/weixin_35958891/article/details/109516814?test=ceshi")
        console.log(data.searchParams.get('test'))
        let text = data.searchParams.get('test')
        res.writeHead(200, { 'Content-Type': 'text/plain' })
        res.end(text+tool.test())
    }


}).listen(3000)
